Phase 1 Update get_bucket to take Bucket object within Storage Client#7856
Phase 1 Update get_bucket to take Bucket object within Storage Client#7856tswast merged 4 commits intogoogleapis:masterfrom
Conversation
tswast
left a comment
There was a problem hiding this comment.
LGTM once the example is updated.
| >>> client = storage.Client() | ||
|
|
||
| >>> # Set properties on a plain resource object. | ||
| >>> bucket = storage.Bucket("my-bucket-name") |
There was a problem hiding this comment.
I fear that this example could lead to people thinking they have to create a Bucket object when they can just pass in a string.
This implementation is more to provide the same mechanism as reload() is currently used, so we should indicate that somehow you got a bucket but think it might be out of date and want to reload it.
Maybe change this line to get_bucket("my-bucket-name"), and then between this and the next call to get_bucket, add a comment like # Time passes. Another program may have modified the bucket in the meantime, so you want to get the latest state.
There was a problem hiding this comment.
Modified the example as directed!
|
System test failure appears to be unrelated to this change. |
|
Hi, we just noticed this change updating from a minor version as our code was doing |
|
Hi @bboe , We do our best to conform to semver, but occasionally mistakes are made. This is one of those times. This change, particularly this line https://github.com/googleapis/google-cloud-python/pull/7856/files#diff-dbb49bf7288430753b6267b849bd01bbR205 altered the argument name which broke your code :( Sorry for the randomization. Ideally this wouldn't happen, and thank you for pointing this out. This was an oversight on this change to consider this minor. |
Part of issue: #7762
@tswast
@engelke